{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "16ab29d7",
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'time' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "Input \u001b[1;32mIn [19]\u001b[0m, in \u001b[0;36m<cell line: 3>\u001b[1;34m()\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[38;5;66;03m#  tm_day  0-6  0 是周一\u001b[39;00m\n\u001b[0;32m      2\u001b[0m \u001b[38;5;66;03m# 准备工作：准备变量\u001b[39;00m\n\u001b[1;32m----> 3\u001b[0m wady \u001b[38;5;241m=\u001b[39m \u001b[43mtime\u001b[49m\u001b[38;5;241m.\u001b[39mlocaltime()\u001b[38;5;241m.\u001b[39mtm_wady\n\u001b[0;32m      4\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m周几\u001b[39m\u001b[38;5;124m\"\u001b[39m,wady)\n\u001b[0;32m      5\u001b[0m today_hour \u001b[38;5;241m=\u001b[39m time\u001b[38;5;241m.\u001b[39mlocaltime()\u001b[38;5;241m.\u001b[39mtm_hour\n",
      "\u001b[1;31mNameError\u001b[0m: name 'time' is not defined"
     ]
    }
   ],
   "source": [
    "#  tm_day  0-6  0 是周一\n",
    "# 准备工作：准备变量\n",
    "wady = time.localtime().tm_wady\n",
    "print(\"周几\",wady)\n",
    "today_hour = time.localtime().tm_hour\n",
    "print(\"几点\",today_hour)\n",
    "today_min = time.loclatime().tm_min\n",
    "print(\"几分\",today_min)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "62ed99b6",
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'wady' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "Input \u001b[1;32mIn [17]\u001b[0m, in \u001b[0;36m<cell line: 1>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[43mwady\u001b[49m \u001b[38;5;241m==\u001b[39m \u001b[38;5;241m0\u001b[39m:\n\u001b[0;32m      2\u001b[0m     \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m有python课\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m      3\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n",
      "\u001b[1;31mNameError\u001b[0m: name 'wady' is not defined"
     ]
    }
   ],
   "source": [
    "if wady == 0:\n",
    "    print(\"有python课\")\n",
    "    if 9<\n",
    "else:\n",
    "    print(\"期待周一\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e8c66d9f",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
